package com.cdck.safe.dete.common.util;

import java.util.jar.JarEntry;

public class ScanJarUtil {

    /**
     * 获取正确的类名
     * @param entry
     * @return
     */
    public static String getClassNameFromJarEntry(JarEntry entry) {
        String entryName = entry.getName();
        if (entryName.endsWith(".class")) {
            String className = entryName.replace("/", ".");
            className = className.substring(0, className.length() - ".class".length());
            className = className.replaceFirst("^BOOT-INF.classes.", "");
            return className;
        }
        return null;
    }







}
